cmake_minimum_required(VERSION 2.6)
set(CMAKE_BUILD_TYPE=Release)
set(CMAKE_CXX_FLAGS_RELEASE "-03")
project(csvparser)

set(csvparser_SRCS 
 csvparser.cpp
 csvrecord.cpp
)

add_library(csvparser SHARED ${csvparser_SRCS})

# INSTALL

# build version(VERSION) and API version(SOVERSION)
set_target_properties(csvparser
 PROPERTIES
 VERSION 0.0.1
 SOVERSION 1)

# Library
install(TARGETS csvparser
 LIBRARY DESTINATION /usr/local/jimblogger.com/lib)

set(csvparser_HDRS 
 csvparser.hpp
 csvrecord.hpp
)

# Headers
install(FILES ${csvparser_HDRS}
 DESTINATION /usr/local/jimblogger.com/include)


set(testapp_SRCS
 testapp.cpp
)

link_libraries(csvparser)

add_executable(testapp ${testapp_SRCS})

#add_subdirectory(testapp)
